package com.hyl.jpademo.dao;

import com.hyl.jpademo.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @Description TODO
 * @Author hyl
 * @Date 2022/5/27 9:03
 **/
public interface SysUserRepository extends JpaRepository<User,Integer> {

//	@Query(value="Select u.usrName as username ,r.roleName as rolename " +
//			"from SysUser u,SysRole r " +
//			"where u.roleId=r.roleId") //HQL
//	public List<UserRoleVo> findInfo();

	//根据用户名和密码查找用户
	public User findByUsrNameAndAndUsrPassword(String name,String pwd);

	//根据用户名查找
	public User findByUsrName(String username);

}
